package com.atguigu.srb.core.service;

import com.atguigu.srb.core.pojo.entity.Borrower;
import com.atguigu.srb.core.pojo.vo.BorrowerApprovalVO;
import com.atguigu.srb.core.pojo.vo.BorrowerDetailVO;
import com.atguigu.srb.core.pojo.vo.BorrowerVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;


/**
 * <p>
 * 借款人 服务类
 * </p>
 *
 * @author Bright
 * @since 2022-04-09
 */
public interface BorrowerService extends IService<Borrower> {

    /**
     * 得到借款人的状态
     * @param userId
     * @return
     */
    Integer getBorrorStatusByUserId(Long userId);


    /**
     * 生成借款人信息表
     * @param borrowerVO
     * @param userId 用户id
     */
    void saveByVo(BorrowerVO borrowerVO, Long userId);


    IPage<Borrower> getPageList(Page<Borrower> pageParam, String keyword);

    /**
     * 展示借款人信息
     * @param id 借款人id
     * @return 借款人信息详情vo类
     */
    BorrowerDetailVO getBorrowerVoById(Long id);

    /**
     * 借款信息认证
     * @param borrowerApprovalVO
     */
    void approval(BorrowerApprovalVO borrowerApprovalVO);
}
